<%@ page import="java.util.Map" %>
<%@ page import="Entity.orderBean" %><%--
  Created by IntelliJ IDEA.
  User: 13459
  Date: 2019/6/10
  Time: 15:21
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html lang="en">
<head>
    <meta charset="utf-8">
    <link rel="stylesheet" href="css/auth.css">

    <link href="fonts/iconfont.css" rel="stylesheet" type="text/css" />
    <link href="css/module.css" rel="stylesheet" type="text/css" />
    <link href="css/pages.css" rel="stylesheet" type="text/css" />
    <title>小米商城后台管理系统</title>
    <style>
        .left_container{

            min-height: 200px;
            float:left;
            width: 20%;
        }
        .right_container{

            min-height: 200px;
            float:right;
            width: 80%;
        }
        .file {
            position: relative;
            display: inline-block;
            background: #D0EEFF;
            border: 1px solid #99D3F5;
            border-radius: 4px;
            padding: 4px 12px;
            overflow: hidden;
            color: #1E88C7;
            text-decoration: none;
            text-indent: 0;
            line-height: 20px;
        }
        .file input {
            position: absolute;
            font-size: 100px;
            right: 0;
            top: 0;
            opacity: 0;
        }
        .file:hover {
            background: #AADFFD;
            border-color: #78C3F3;
            color: #004974;
            text-decoration: none;
        }
    </style>
    <script src="js/jquery-1.9.1.min.js" type="text/javascript"></script>
    <script src="js/jquery.nicescroll.js" type="text/javascript"></script>
    <script src="js/HUpages.js" type="text/javascript"></script>
    <script src="js/common.js" type="text/javascript"></script>

    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <!-- plugins:css -->
    <link rel="stylesheet" href="vendors/iconfonts/mdi/css/materialdesignicons.min.css">
    <link rel="stylesheet" href="vendors/css/vendor.bundle.base.css">
    <!-- endinject -->
    <!-- plugin css for this page -->
    <link rel="stylesheet" href="node_modules/jqvmap/dist/jqvmap.min.css" />
    <!-- End plugin css for this page -->
    <!-- inject:css -->
    <link rel="stylesheet" href="css/style.css">
    <!-- endinject -->
    <link rel="shortcut icon" href="images/logo.jpg" />

</head>
<body >
<%--判断用户是否登陆--%>
<%
    Map<String,String> userName = (Map<String, String>) request.getSession().getAttribute("userName");
    String path = new String();
    String usename = new String();
    if(userName != null) {

        for(String key : userName.keySet()){
            String value = userName.get(key);
            if (key.equals("img"))
                path = value;
            if (key.equals("用户名"))
                usename = value;

        }
    }
    else{
%>
<script language='javascript'>document.location = 'http://localhost:8080/login.html '</script>
<%
    }
%>
<div class="container-scroller">
    <!-- partial:partials/_navbar.html -->
    <nav class="navbar default-layout-navbar col-lg-12 col-12 p-0 fixed-top d-flex flex-row">
        <div class="text-center navbar-brand-wrapper d-flex align-items-center justify-content-center">
            <img src="images/logo.jpg">
            <!--a class="navbar-brand brand-logo-mini" href="index.html"><img src="images/logo-mini.svg" alt="logo"/></a-->
        </div>
        <div class="navbar-menu-wrapper d-flex align-items-stretch">

            <ul class="navbar-nav navbar-nav-right">
                <li class="nav-item nav-profile dropdown">
                    <a class="nav-link dropdown-toggle" id="profileDropdown" href="#" data-toggle="dropdown" aria-expanded="false">
                        <div class="nav-profile-img">
                            <!--头像根据登录的用户改 -->
                            <img src="images/faces/<%=path%>" alt="image">
                            <span class="availability-status online"></span>
                        </div>
                        <div class="nav-profile-text">
                            <!--名字根据登录的用户改 -->
                            <p class="mb-1 text-black">你好，<%=usename%></p>
                        </div>
                    </a>
                    <div class="dropdown-menu navbar-dropdown" aria-labelledby="profileDropdown">
                        <a class="dropdown-item" href="person_center.html">
                            <i class="mdi mdi-cached mr-2 text-success"></i>
                            个人中心
                        </a>
                        <div class="dropdown-divider"></div>
                        <a class="dropdown-item" href="login.html">
                            <i class="mdi mdi-logout mr-2 text-primary"></i>
                            退出
                        </a>
                    </div>
                </li>
                <li class="nav-item d-none d-lg-block full-screen-link">
                    <a class="nav-link">
                        <i class="mdi mdi-fullscreen" id="fullscreen-button"></i>
                    </a>
                <li class="nav-item nav-logout d-none d-lg-block">
                    <a class="nav-link" href="login.html">
                        <i class="mdi mdi-power"></i>
                    </a>
                </li>
                </li>
            </ul>
            <button class="navbar-toggler navbar-toggler-right d-lg-none align-self-center" type="button" data-toggle="offcanvas">
                <span class="mdi mdi-menu"></span>
            </button>
        </div>
    </nav>
    <!-- partial -->
    <div class="container-fluid page-body-wrapper">
        <!-- partial:partials/_sidebar.html -->
        <nav class="sidebar sidebar-offcanvas" id="sidebar">
            <ul class="nav">
                <li class="nav-item nav-profile">
                    <a href="index.jsp" class="nav-link">
                        <div class="nav-profile-image">
                            <!--头像根据登录的用户改 -->
                            <img src="images/faces/<%=path%>" alt="profile">
                            <span class="login-status online"></span> <!--change to offline or busy as needed-->
                        </div>
                        <div class="nav-profile-text d-flex flex-column">
                            <!--名字角色根据登录的用户改 -->
                            <span class="font-weight-bold mb-2"><%=usename%></span>
                            <span class="text-secondary text-small">系统管理员</span>
                        </div>
                        <i class="mdi mdi-bookmark-check text-success nav-profile-badge"></i>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="index.jsp">
                        <span class="menu-title">首页</span>
                        <i class="mdi mdi-home menu-icon"></i>
                    </a>
                </li>

                <li class="nav-item">
                    <a class="nav-link" href="user_manage.jsp">
                        <span class="menu-title">用户管理</span>
                        <i class="mdi mdi-contacts menu-icon"></i>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="http://localhost:8080/goodmanageServlet">
                        <span class="menu-title">商品管理</span>
                        <i class="mdi mdi-format-list-bulleted menu-icon"></i>
                    </a>
                </li>


                <li class="nav-item">
                    <a class="nav-link" data-toggle="collapse" href="#ui-basic" aria-expanded="false" aria-controls="ui-basic">
                        <span class="menu-title">订单管理</span>
                        <i class="menu-arrow"></i>
                        <i class="mdi mdi-crosshairs-gps menu-icon"></i>
                    </a>
                    <div class="collapse" id="ui-basic">
                        <ul class="nav flex-column sub-menu">
                            <li class="nav-item"> <a class="nav-link" href="http://localhost:8080/order_manageServlet">订单内容</a></li>
                            <li class="nav-item"> <a class="nav-link" href="http://localhost:8080/order_deliveryServlet">订单配送</a></li>
                        </ul>
                    </div>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="http://localhost:8080/message_manageServlet">
                        <span class="menu-title">留言管理</span>
                        <i class="mdi mdi-table-large menu-icon"></i>
                    </a>
                </li>

                <li class="nav-item">
                    <a class="nav-link"  href="person_center.html">
                        <span class="menu-title">个人中心</span>
                        <i class="mdi mdi-medical-bag menu-icon"></i>
                    </a>
                </li>
            </ul>
        </nav>
        <!-- partial -->

        <div class="main-panel">
            <div class="content-wrapper">

                <div class="box-module">
                    <div class="box-title">修改订单信息</div>
                    <div class="box-content">
                        <%
                        orderBean ff=(orderBean)session.getAttribute("orderBean");
                        if(ff==null) {
                            response.sendRedirect("http://localhost:8080/order_manageServlet");
                        }
                        else
                        {
                        %>
                        <div class="Shops_info clearfix">
                            <div>
                                <div class="left_container">
                                        <img src="img/<%=ff.getGoods_img()%>" height="180" width="180"><br/>
                                </div>
                                <div class="right_container">
                                    <div class="col-12 grid-margin stretch-card">
                                        <div class="card">
                                            <div class="card-body">

                                                <form class="forms-sample" action="http://localhost:8080/changeOrderServlet?key=0" method ="post">
                                                    <div class="form-group">
                                                        <label for="exampleInputName1">订单号</label>
                                                        <input type="text" class="form-control" readonly="readonly" id="exampleInputName1" placeholder="订单号" value="<%=ff.getOrder_id()%>" name="order_id">
                                                    </div>
                                                    <div class="form-group">
                                                        <label for="exampleInputName1">商品名称</label>
                                                        <input type="text" class="form-control" readonly="readonly" id="exampleInputName2" placeholder="商品名称" value="<%=ff.getName()%>">
                                                    </div>
                                                    <div class="form-group">
                                                        <label for="exampleInputEmail3">下单时间</label>
                                                        <input type="text" class="form-control" readonly="readonly" id="exampleInputEmail3" placeholder="下单时间" value="<%=ff.getTime()%>">
                                                    </div>
                                                    <div class="form-group">
                                                        <label for="exampleInputPassword4">价格</label>
                                                        <input type="password" class="form-control" readonly="readonly" id="exampleInputPassword4" placeholder="价格" value="<%=ff.getGoods_price()%>">
                                                    </div>
                                                    <div class="form-group">
                                                        <label for="exampleInputName1">买家id</label>
                                                        <input type="text" class="form-control" readonly="readonly" id="exampleInputName5" placeholder="买家id" value="<%=ff.getUse_id()%>">
                                                    </div>
                                                    <div class="form-group">
                                                        <label for="exampleInputName1">买家名</label>
                                                        <input type="text" class="form-control" readonly="readonly" id="exampleInputName6" placeholder="买家名" value="<%=ff.getUsername()%>">
                                                    </div>
                                                    <div class="form-group">
                                                        <label for="exampleInputName1">支付方式</label>
                                                        <input type="text" class="form-control" readonly="readonly" id="exampleInputName7" placeholder="支付方式" value="<%=ff.getWay()%>">
                                                    </div>
                                                    <div class="form-group">
                                                        <label for="exampleInputName1">配送地址</label>
                                                        <input type="text" class="form-control" id="exampleInputName8" placeholder="地址" value="<%=ff.getAddress()%>" name="address">
                                                    </div>
                                                    <button type="submit" class="btn btn-gradient-primary mr-2">确定</button>
                                                    <button href="http://localhost:8080/order_manageServlet" class="btn btn-light">取消</button>
                                                </form>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>

                        </div>
                        <%
                            }
                        %>
                    </div>
                </div>



            </div>
            <footer class="footer">
                <div class="d-sm-flex justify-content-center justify-content-sm-between">
                    <span class="text-muted text-center text-sm-left d-block d-sm-inline-block">&copy; 由黄鑫杰与郑燕萍联合出品</span>
                </div>
            </footer>
            <!-- content-wrapper ends -->
            <!-- partial:partials/_footer.html -->
            <!-- partial -->
        </div>
        <!-- main-panel ends -->
    </div>
    <!-- page-body-wrapper ends -->
</div>
<!-- container-scroller -->

<!-- plugins:js -->
<script src="vendors/js/vendor.bundle.base.js"></script>
<script src="vendors/js/vendor.bundle.addons.js"></script>
<!-- endinject -->
<!-- Plugin js for this page-->
<!-- End plugin js for this page-->
<!-- inject:js -->
<script src="js/off-canvas.js"></script>
<script src="js/misc.js"></script>
<!-- endinject -->
<!-- Custom js for this page-->
<script src="js/dashboard.js"></script>
<!-- End custom js for this page-->
<script src="js/auth.js"></script>
<script>
    Auth.init({
        login_url: '#login',
        forgot_url: '#forgot'
    });
</script>
</body>

</html>

